package com.model.dto.sys.menu;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.*;

@Data
public class CreateSysMenuDTO {
    @ApiModelProperty(value = "菜单名称",required = true)
    @NotEmpty
    @Size(min = 0, max = 50, message = "menuName长度限制为50")
    @NotNull(message = "menuName不能为空")
    private String menuName;

    @ApiModelProperty(value = "父菜单ID",required = true)
    @NotNull(message = "parentId不能为空")
    private Long parentId;

    @ApiModelProperty(value = "显示顺序",required = true)
    @NotNull(message = "orderNum不能为空")
    private Integer orderNum;

    @ApiModelProperty(value = "路由地址",required = true)
    @NotEmpty
    @Size(min = 0, max = 255, message = "path长度限制为255")
    @NotNull(message = "path不能为空")
    private String path;

    @ApiModelProperty(value = "组件路径",required = true)
    @NotEmpty
    @Size(min = 0, max = 255, message = "component长度限制为255")
    @NotNull(message = "component不能为空")
    private String component;

    @ApiModelProperty(value = "0:外链,1:非外链",allowableValues = "0,1",required = true)
    @Min(value = 0, message = "0:外链,1:非外链")
    @Max(value = 1, message = "0:外链,1:非外链")
    @NotNull(message = "isFrame不能为空")
    private Byte isFrame;

    @ApiModelProperty(value = "0:缓存,1:不缓存",allowableValues = "0,1",required = true)
    @Min(value = 0, message = "0:缓存,1:不缓存")
    @Max(value = 1, message = "0:缓存,1:不缓存")
    @NotNull(message = "isCache不能为空")
    private Byte isCache;

    @ApiModelProperty(value = "0:目录,1:菜单,2:按钮",allowableValues = "0,1,2",required = true)
    @Min(value = 0, message = "0:目录,1:菜单,2:按钮")
    @Max(value = 2, message = "0:目录,1:菜单,2:按钮")
    @NotNull(message = "menuType不能为空")
    private Byte menuType;

    @ApiModelProperty(value = "0:显示,1:隐藏",allowableValues = "0,1",required = true)
    @Min(value = 0, message = "0:显示,1:隐藏")
    @Max(value = 1, message = "0:显示,1:隐藏")
    @NotNull(message = "visible不能为空")
    private Byte visible;

    @ApiModelProperty(value = "权限标识",required = true)
    @NotEmpty
    @Size(min = 0, max = 128, message = "perms长度限制为128")
    @NotNull(message = "perms不能为空")
    private String perms;

    @ApiModelProperty(value = "菜单图标",required = true)
    @NotEmpty
    @Size(min = 0, max = 128, message = "icon长度限制为128")
    @NotNull(message = "icon不能为空")
    private String icon;

}
